ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / WLanguage functions / Communication / Drive functions
  • Downloaded file
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Downloads a file from a remote drive to the user's computer.
Example
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"

oDrive is Drive
oDrive = oDriveConnect(oOAuth2Param)

// Select local directory
sDirectory is string
sDirectory = fSelectDir(fExeDir(), "Local directory where to download the file")

// Downloads the file
IF oDrive.DownloadFile("/MyPhotos/2000/0001.jpg", sDirectory) = False THEN
Error("Unable to download file", ErrorInfo())
RETURN
END
Syntax
<Result> = <Drive>.DownloadFile(<File to download> , <Local location>)
<Result>: Boolean
  • True if the file has been downloaded,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Drive>: Drive or gglDrive variable
Name of the Drive or gglDrive variable that corresponds to the drive to be used. The connection to the drive must have been previously established. Otherwise, the file is not downloaded.
<File to download>: Character string
Absolute path of the file to be downloaded from the remote drive. If this parameter does not correspond to a valid file path, the file will not be downloaded.
<Local location>: Character string
Absolute path of the file to be saved on the local computer. If this parameter does not correspond to a valid file path, or if a file with the same name already exists, the file will not be downloaded.
Remarks

Downloaded file

The downloaded file is no longer linked to the remote drive. No changes made to the file on the remote drive will be reflected on the downloaded file (and vice versa).
Business / UI classification: Business Logic
Component: wd290ggl.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/05/2024

Send a report | Local help